package com.iot.system.service.impl;

import java.util.List;
import com.iot.common.utils.DateUtils;
import com.iot.system.domain.ProductionLineInfo;
import com.iot.system.mapper.ProductionLineInfoMapper;
import com.iot.system.service.IProductionLineInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 产线信息Service业务层处理
 * 
 * @author iot
 * @date 2025-02-12
 */
@Service
public class ProductionLineInfoServiceImpl implements IProductionLineInfoService
{
    @Autowired
    private ProductionLineInfoMapper productionLineInfoMapper;

    /**
     * 查询产线信息
     * 
     * @param id 产线信息主键
     * @return 产线信息
     */
    @Override
    public ProductionLineInfo selectProductionLineInfoById(Long id)
    {
        return productionLineInfoMapper.selectProductionLineInfoById(id);
    }

    /**
     * 查询产线信息列表
     * 
     * @param productionLineInfo 产线信息
     * @return 产线信息
     */
    @Override
    public List<ProductionLineInfo> selectProductionLineInfoList(ProductionLineInfo productionLineInfo)
    {
        return productionLineInfoMapper.selectProductionLineInfoList(productionLineInfo);
    }

    /**
     * 新增产线信息
     * 
     * @param productionLineInfo 产线信息
     * @return 结果
     */
    @Override
    public int insertProductionLineInfo(ProductionLineInfo productionLineInfo)
    {
        productionLineInfo.setCreateTime(DateUtils.getNowDate());
        return productionLineInfoMapper.insertProductionLineInfo(productionLineInfo);
    }

    /**
     * 修改产线信息
     * 
     * @param productionLineInfo 产线信息
     * @return 结果
     */
    @Override
    public int updateProductionLineInfo(ProductionLineInfo productionLineInfo)
    {
        return productionLineInfoMapper.updateProductionLineInfo(productionLineInfo);
    }

    /**
     * 批量删除产线信息
     * 
     * @param ids 需要删除的产线信息主键
     * @return 结果
     */
    @Override
    public int deleteProductionLineInfoByIds(Long[] ids)
    {
        return productionLineInfoMapper.deleteProductionLineInfoByIds(ids);
    }

    /**
     * 删除产线信息信息
     * 
     * @param id 产线信息主键
     * @return 结果
     */
    @Override
    public int deleteProductionLineInfoById(Long id)
    {
        return productionLineInfoMapper.deleteProductionLineInfoById(id);
    }
}
